#ifndef DEFER_H
#define DEFER_H

#include <QObject>
#include <functional>

typedef std::function<void()> deferfunc;

class Defer
{
public:
    Defer(deferfunc func = nullptr);
    ~Defer();

private:
    deferfunc m_func;

    Q_DISABLE_COPY(Defer)
};

#endif // DEFER_H
